package com.chixing.day06_static.static_demo;

public class Bank2 {
    private static Bank2 bank=null;
    private Bank2(){
        System.out.println("这是一个私有的构造方法！");
    }

    public static Bank2 getInstance(){
        if(bank==null){
            bank =new Bank2();   //什么时候用就什么时候创建
        }
        return bank;
    }
}
